﻿Imports System
Imports System.Collections

Public Class RolBE
#Region "Campos y Propiedades"
    Private _IdRol As Integer
    Private _Nombre As String
    Private _Estado As String
    Private _EstadoDescripcion As String
    Private _FechaCreacion As DateTime
    Private _FechaModificacion As DateTime

    Public Property IdRol() As Integer
        Get
            Return _IdRol
        End Get
        Set(ByVal value As Integer)
            _IdRol = value
        End Set
    End Property

    Public Property Nombre() As String
        Get
            Return _Nombre
        End Get
        Set(ByVal value As String)
            _Nombre = value
        End Set
    End Property

    Public Property Estado() As String
        Get
            Return _Estado
        End Get
        Set(ByVal value As String)
            _Estado = value
        End Set
    End Property

    Public Property EstadoDescripcion() As String
        Get
            Return _EstadoDescripcion
        End Get
        Set(ByVal value As String)
            _EstadoDescripcion = value
        End Set
    End Property

    Public Property FechaCreacion() As DateTime
        Get
            Return _FechaCreacion
        End Get
        Set(ByVal value As DateTime)
            _FechaCreacion = value
        End Set
    End Property

    Public Property FechaModificacion() As DateTime
        Get
            Return _FechaModificacion
        End Get
        Set(ByVal value As DateTime)
            _FechaModificacion = value
        End Set
    End Property


#End Region

#Region "Constructores"

    Public Sub New()

    End Sub

    Public Sub New(ByVal IdRol As Integer, ByVal Nombre As String, ByVal Estado As String, ByVal FechaCreacion As DateTime, ByVal FechaModificacion As DateTime)
        Me._IdRol = IdRol
        Me._Nombre = Nombre
        Me._Estado = Estado
        Me._FechaCreacion = FechaCreacion
        Me._FechaModificacion = FechaModificacion
    End Sub
#End Region
End Class

Public Class RolBECollection
    Inherits CollectionBase

    Default Public Property Item(ByVal index As Integer) As RolBE
        Get
            Return CType(List(index), RolBE)
        End Get
        Set(ByVal value As RolBE)
            List(index) = value
        End Set
    End Property

    Public Function Add(ByVal value As RolBE) As Integer
        Return (List.Add(value))
    End Function

    Public Function IndexOf(ByVal value As RolBE) As Integer
        Return (List.IndexOf(value))
    End Function

    Public Sub Insert(ByVal index As Integer, ByVal value As RolBE)
        List.Insert(index, value)
    End Sub

    Public Sub Remove(ByVal value As RolBE)
        List.Remove(value)
    End Sub

    Public Function Contains(ByVal value As RolBE) As Boolean
        Return (List.Contains(value))
    End Function
End Class


